package com.base.sharding.transaction.annotations;

import org.apache.shardingsphere.transaction.core.TransactionType;

import java.lang.annotation.*;

/**
 * @Author liuyjy
 * @Date 2022/2/25 16:35
 * @Description: 代理
 **/
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface ShardingTransaction {

    /**
     * Sharding 分布式事务有三种类型  LOCAL, XA, BASE.
     * 默认 LOCAL.
     *
     * @return Sharding transaction type
     */

    TransactionType value() default TransactionType.LOCAL;
}
